'use client'
import { OrbitControls } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";
import { useRouter } from "next/navigation";
import styles from "./show.module.css"
import { useState } from "react";
import { Show } from "../../components/Show";

export default function Page() {
    const router = useRouter()
    return (
        <div className={styles.container}>
            <button type="button" onClick={() => router.back()}>
                Click here to go back
            </button>
            <Canvas>
                <ambientLight intensity={2} />
                <OrbitControls />
                <Show src="/assets/su57_anim.glb" partsNames={["right_wing", "left_wing"]} />
            </Canvas>
        </div>
    )
}